#ifndef __GRAPHIC_PARTICLE_MODIFIER_VISIBILITY__
    #define __GRAPHIC_PARTICLE_MODIFIER_VISIBILITY__

    // -- LOCAL

    // .. REFERENCES

	#include "primitives.h"
    #include "ref_to_.h"
    #include "graphic_particle_modifier.h"
	#include "defs.h"
	#include "math_curve_linear.h"

    // -- GLOBAL

    // .. TYPES

    class GRAPHIC_PARTICLE_MODIFIER_VISIBILITY :
        public GRAPHIC_PARTICLE_MODIFIER
    {
        // -- PUBLIC

    public :

        // .. TYPES

        DECLARE_REF( GRAPHIC_PARTICLE_MODIFIER_VISIBILITY );

        // .. CONSTRUCTORS

        GRAPHIC_PARTICLE_MODIFIER_VISIBILITY();

        // ~~

        virtual ~GRAPHIC_PARTICLE_MODIFIER_VISIBILITY();

        // .. ACCESSORS

        VOID SetLifeTime(
            const REAL & life_time
            )
        {
            LifeTime = life_time;
        }

        // .. OPERATIONS

        virtual VOID Modify(
            GRAPHIC_PARTICLE_TABLE::FIXED_PARTICLE_TABLE & particle_table,
            const TIMER & time_step
            );

        // ~~

        VOID AddVisibility(
            const REAL visibility,
            const REAL & time = 0
            )
        {
            VisibilityCurve.AddPoint( time, visibility );
        }

        // -- PRIVATE

    private :

        // .. CONSTRUCTORS

        GRAPHIC_PARTICLE_MODIFIER_VISIBILITY(
            const GRAPHIC_PARTICLE_MODIFIER_VISIBILITY & other
            );

        // .. OPERATORS

        GRAPHIC_PARTICLE_MODIFIER_VISIBILITY & operator=(
            const GRAPHIC_PARTICLE_MODIFIER_VISIBILITY & other
            );

        // .. ATTRIBUTES

        REAL
            LifeTime;
        MATH_CURVE_LINEAR< REAL >
            VisibilityCurve;
    };
#endif
